// 省级分公司
import http from '../helper/http.js'
const path = '/api/adm/v1/'

// 余额提现列表和筛选
export let brwithdraw = ({ verifyType, startTime, endTime, searchType, name, page, num }) => {
  return http.post(`${path}brwithdraw/search`, {
    verify_type: verifyType, // 0 全部 1 未审核 2 已审核 3 已拒绝
    start_time: startTime,
    end_time: endTime,
    search_type: searchType, // 搜索条件 0 全部 1 编号 2 名称 3 手机号 4 流水号
    name,
    page,
    num
  })
}

// 余额提现-审核和拒绝
export let updateBrwithdraw = ({ id, memo, status }) => {
  return http.post(`${path}brwithdraw/update`, {
    id,
    memo,
    status
  })
}

// 余额提现详情页
export let showBrwithdraw = ({ id }) => {
  return http.post(`${path}brwithdraw/show`, {
    id
  })
}

// 列表加筛选
export let searchBranch = ({ areaId, provinceId, startTime, endTime, searchType, name, page, num }) => {
  return http.post(`${path}branch/search`, {
    area_id: areaId, // 0 全部 1 未审核 2 已审核 3 已拒绝
    province_id: provinceId,
    start_time: startTime,
    end_time: endTime,
    search_type: searchType, // 搜索条件 0 全部 1 id 2 编号 3 名称 4 手机号
    name,
    page,
    num
  })
}

// 省分公司余额提现导出/api/adm/v1/brwithdraw/export
export let brwithdrawExport = (params) => {
  return http.post(`${path}brwithdraw/export`, params)
}
